﻿using System;
using SharpSqlAnalyzer.nodes.oracle;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x02000354 RID: 852
	public class TTableElement : TParseTreeNode
	{
		// Token: 0x17000783 RID: 1923
		// (get) Token: 0x06002379 RID: 9081 RVA: 0x003376AB File Offset: 0x003358AB
		// (set) Token: 0x0600237A RID: 9082 RVA: 0x003376B3 File Offset: 0x003358B3
		public virtual TObjectName ParentTable
		{
			get
			{
				return this.parentTable;
			}
			set
			{
				this.parentTable = value;
			}
		}

		// Token: 0x17000784 RID: 1924
		// (get) Token: 0x0600237B RID: 9083 RVA: 0x003376BC File Offset: 0x003358BC
		// (set) Token: 0x0600237C RID: 9084 RVA: 0x003376C4 File Offset: 0x003358C4
		public virtual TConstraint Constraint
		{
			get
			{
				return this.constraint;
			}
			set
			{
				this.constraint = value;
			}
		}

		// Token: 0x0600237D RID: 9085 RVA: 0x003376D0 File Offset: 0x003358D0
		public override void init(object arg1)
		{
			if (arg1 is TColumnDefinition)
			{
				this.columnDefinition = (TColumnDefinition)arg1;
				this.type = 1;
				return;
			}
			if (arg1 is TConstraint)
			{
				this.constraint = (TConstraint)arg1;
				this.type = 2;
				return;
			}
			if (arg1 is TDummy)
			{
				this.parentTable = (TObjectName)((TDummy)arg1).node1;
				this.type = 3;
				return;
			}
			if (arg1 is TSupplementalLogging)
			{
				this.supplementalLogging = (TSupplementalLogging)arg1;
				this.type = 4;
			}
		}

		// Token: 0x17000785 RID: 1925
		// (get) Token: 0x0600237E RID: 9086 RVA: 0x00337756 File Offset: 0x00335956
		// (set) Token: 0x0600237F RID: 9087 RVA: 0x0033775E File Offset: 0x0033595E
		public virtual TColumnDefinition ColumnDefinition
		{
			get
			{
				return this.columnDefinition;
			}
			set
			{
				this.columnDefinition = value;
			}
		}

		// Token: 0x17000786 RID: 1926
		// (get) Token: 0x06002380 RID: 9088 RVA: 0x00337767 File Offset: 0x00335967
		// (set) Token: 0x06002381 RID: 9089 RVA: 0x0033776F File Offset: 0x0033596F
		public virtual int Type
		{
			get
			{
				return this.type;
			}
			set
			{
				this.type = value;
			}
		}

		// Token: 0x06002382 RID: 9090 RVA: 0x00337778 File Offset: 0x00335978
		public override void doParse(TCustomSqlStatement psql, ESqlClause plocation)
		{
			if (this.columnDefinition != null)
			{
				this.columnDefinition.doParse(psql, plocation);
			}
			if (this.constraint != null)
			{
				this.constraint.doParse(psql, plocation);
			}
		}

		// Token: 0x06002383 RID: 9091 RVA: 0x003377A4 File Offset: 0x003359A4
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06002384 RID: 9092 RVA: 0x003377B4 File Offset: 0x003359B4
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x17000787 RID: 1927
		// (set) Token: 0x06002385 RID: 9093 RVA: 0x003377C4 File Offset: 0x003359C4
		public virtual TSupplementalLogging SupplementalLogging
		{
			set
			{
				this.supplementalLogging = value;
			}
		}

		// Token: 0x04001BC9 RID: 7113
		public const int type_column_def = 1;

		// Token: 0x04001BCA RID: 7114
		public const int type_table_constraint = 2;

		// Token: 0x04001BCB RID: 7115
		public const int type_table_like = 3;

		// Token: 0x04001BCC RID: 7116
		public const int type_supplemental_logging = 4;

		// Token: 0x04001BCD RID: 7117
		private int type = 1;

		// Token: 0x04001BCE RID: 7118
		private TObjectName parentTable;

		// Token: 0x04001BCF RID: 7119
		private TColumnDefinition columnDefinition;

		// Token: 0x04001BD0 RID: 7120
		private TConstraint constraint;

		// Token: 0x04001BD1 RID: 7121
		private TSupplementalLogging supplementalLogging;
	}
}
